<template>
  <xh-pages>
    <!-- #ifdef H5 -->
    <!-- 公众号登录 -->
    <XhWechatLogin :icode="icode" v-if="isWeiXinLogin()" />
    <!-- H5登录 -->
    <XhH5Login :icode="icode" v-else />
    <!-- #endif -->
  </xh-pages>
</template>
  
<script lang="ts" setup>
import XhH5Login from '@/components/xh-login/h5.vue'
import XhWechatLogin from '@/components/xh-login/wechat.vue'
import { isWeiXinLogin } from '@/utils/helpers'

const icode = ref('')

onLoad(() => {
  const Cache = uni.getStorageSync('icode')
  icode.value = Cache ?? ''
})
</script>
  
<style lang="scss"></style>
  